module.exports = function (sql) {
  return new Promise((resolve, reject) => {
    const mysql = require("mysql");
    const connection = mysql.createConnection({
      host: "47.108.156.13",
      user: "root",
      password: "root",
      database: "coderlee",
    });
    connection.connect();
    connection.query(sql, (err, result) => {
      if (err) {
        reject(err);
      }
      resolve(result);
    });
    connection.end();
  });
};
